#ifndef ENGINEUPDATED_DYNAMAX_H
#define ENGINEUPDATED_DYNAMAX_H

enum BattleEvolutionType CurrentBttlerEvolutionStat(u8 battlerId);
u8 GetBattlerInMegaOrDynamax(u8 battlerId);
void HideTriggerSprite();
u8 CreateIndicator(u32 battlerId);
void ChangeTriggerSprite(u8 battlerId, u8 state);
u8 GetIndicatorSpriteId(u32 healthboxSpriteId);
bool32 HandleDynamaxEndTurnEffect();
bool32 IsEvolutionHappened(u32 battlerId, u8 type);
bool32 BattleSwitchInFormChange(u32 battlerId);
bool32 BattleBeforeUseMoveFormChange(u32 battlerId);
bool32 BattlerUseMoveFormChange(u32 battlerId);
enum BattleEvolutionType GetEvolutionType(u8 battlerId);
const struct Evolution* FindBattlerEvolution(u16 species, u16 type);
void SetEvolutionHappend(u8 battlerId);
enum BattleEvolutionType {
    EvolutionNone = 0, EvolutionMega = 1, EvolutionDynamax = 2, EvolutionZmove = 3
};
enum BattleSwitchoutType {
    BATTLE_FAINT,BATTLE_SWITCH_OUT,BATTLE_END
};
void AttackCancelerZMove();
void BattleScriptPushCurrent(const void* newPtr);
struct Pokemon* GetBankPartyData(u8 bank);
extern const u8 BattleScript_ScreenCleaner[];
extern const u8 BattleScript_PERISH_BODY[];
extern const u8 BattleScript_WANDERING_SPIRIT[];

enum MaxMoveEffect
{
    MAX_EFFECT_NONE,
    MAX_EFFECT_RAISE_TEAM_ATTACK,
    MAX_EFFECT_RAISE_TEAM_DEFENSE,
    MAX_EFFECT_RAISE_TEAM_SPEED,
    MAX_EFFECT_RAISE_TEAM_SP_ATK,
    MAX_EFFECT_RAISE_TEAM_SP_DEF,
    MAX_EFFECT_LOWER_ATTACK,
    MAX_EFFECT_LOWER_DEFENSE,
    MAX_EFFECT_LOWER_SPEED,
    MAX_EFFECT_LOWER_SP_ATK,
    MAX_EFFECT_LOWER_SP_DEF,
    MAX_EFFECT_SUN,
    MAX_EFFECT_RAIN,
    MAX_EFFECT_SANDSTORM,
    MAX_EFFECT_HAIL,
    MAX_EFFECT_ELECTRIC_TERRAIN,
    MAX_EFFECT_GRASSY_TERRAIN,
    MAX_EFFECT_MISTY_TERRAIN,
    MAX_EFFECT_PSYCHIC_TERRAIN,
    MAX_EFFECT_VINE_LASH,
    MAX_EFFECT_WILDFIRE,
    MAX_EFFECT_CANNONADE,
    MAX_EFFECT_EFFECT_SPORE_FOES,
    MAX_EFFECT_PARALYZE_FOES,
    MAX_EFFECT_CONFUSE_FOES_PAY_DAY,
    MAX_EFFECT_CRIT_PLUS,
    MAX_EFFECT_MEAN_LOOK,
    MAX_EFFECT_AURORA_VEIL,
    MAX_EFFECT_INFATUATE_FOES,
    MAX_EFFECT_RECYCLE_BERRIES,
    MAX_EFFECT_POISON_FOES,
    MAX_EFFECT_STEALTH_ROCK,
    MAX_EFFECT_DEFOG,
    MAX_EFFECT_POISON_PARALYZE_FOES,
    MAX_EFFECT_HEAL_TEAM,
    MAX_EFFECT_SPITE,
    MAX_EFFECT_GRAVITY,
    MAX_EFFECT_VOLCAITH_FOES,
    MAX_EFFECT_SANDBLAST_FOES,
    MAX_EFFECT_YAWN_FOE,
    MAX_EFFECT_LOWER_EVASIVENESS_FOES,
    MAX_EFFECT_AROMATHERAPY,
    MAX_EFFECT_CONFUSE_FOES,
    MAX_EFFECT_STEELSURGE,
    MAX_EFFECT_TORMENT_FOES,
    MAX_EFFECT_LOWER_SPEED_2_FOES,
    MAX_EFFECT_FIRE_SPIN_FOES,
};

#define DYNAMAX_SET_RAIN 0
#define DYNAMAX_SET_SUNNY 1
#define DYNAMAX_SET_SANDSTORM 2
#define DYNAMAX_SET_HAIL 3
#define DYNAMAX_GMAX_1 0x20
#define DYNAMAX_RANDOM_STATUS 71
#define DYNAMAX_RANDOM_STATUS_2 72
#define DYNAMAX_GOLD_RUSH 73
#define DYNAMAX_FOAM_BURST 74
#define DYNAMAX_AURORA_VEIL 75
#define DYNAMAX_ATTRACT 76
#define DYNAMAX_RECYCLE_ITEM 77
#define DYNAMAX_TEALTH_ROCK 78
#define DYNAMAX_CLEAR_ROCK 79
#define DYNAMAX_HEAL_USER 80
#define DYNAMAX_PP_REDUCE 81
#define DYNAMAX_GRAVITY 82
#define DYNAMAX_HEAL_PARTY_STATUS 83
#define DYNAMAX_TORMENT 84
u8 GetZMovePower(u8 battlerId);
u8 GetDynamaxMovePower(u8 battlerId);
bool8 IsZMove(u16 move);
void BattleSwitchoutFormChange(u32 monId, u32 side, enum BattleSwitchoutType type);
bool8 PlayerHandleDisplayEvolutionSymbol();
bool8 DisableBattlerEvolution(u8 battlerId, u8 monId, enum BattleEvolutionType type);
const struct Evolution* RevertEvoBaseSpecies(struct Pokemon* poke, u16 type);
const u8* VariousClearTerrian();
u8 OpponentPreHandleMegaEvo(u8 battlerId);
void RefreshMoveMenu(u8 battler, u8 state);

#endif //ENGINEUPDATED_DYNAMAX_H
